package com.novasoftware.novagooglemap.db.builder;

import org.json.JSONException;
import org.json.JSONObject;

import android.content.ContentValues;
import android.database.Cursor;

import com.novasoftware.novagooglemap.db.DataBaseBuilder;
import com.novasoftware.novagooglemap.db.entity.Agent;
import com.novasoftware.novagooglemap.db.entity.Natatoria;

public class AgentBuilder implements DataBaseBuilder<Agent> {

    private String root="";
	
	public String getRoot() {
		return this.root;
	}

	public void setRoot(String root) {
		this.root = root;
	}

	public String table() {
		return "Natatoria";
	}

	@Override
	public Agent build(Cursor query) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ContentValues deconstruct(Agent entity) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public Agent jsonBuild(JSONObject jsonObject) throws JSONException {
		Agent jameado = new Agent();
		jameado.Id = jsonObject.getInt(root+"id");
		jameado.Name = jsonObject.getString(root+"name");
		jameado.Image = jsonObject.getString(root+"image");
		return jameado;
	}

}
